<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>动态图片集</title>
    <script type="text/javascript" th:src="@{/js/jquery-3.2.1.min.js}"></script>
    <style>

    </style>
</head>
<body>
<div id="img"></div>
<!--<img src="#" style="width: 300px;height: 300px;display: inline-block">-->
</body>
<script type="text/javascript">
    function child(obj) {
        console.log("obj-->"+obj);
        obj = obj.replace('[','');
        obj = obj.replace(']','');
        var paths = obj.split(",");
        for(var i=1;i<=paths.length;i++){
            console.log(paths[i-1]);
            var imgSrc = "<img src="+paths[i-1]+" style=\"width: 200px;height: 200px;";
            if(i%3!=0)
                imgSrc += "margin-right:5px;display: inline-block\"";
            else
                imgSrc += "\"";
            imgSrc += ">";
            $("#img").append(imgSrc);
        }
    }
</script>
</html>